package lunchy.data.classes;

import lunchy.data.interfaces.ILunchyUser;
import lunchy.main.CLunchyApplication;

public class CLunchyUser implements ILunchyUser
{
	private boolean isAdmin = false;
	private Integer id = 0;
	private String login = "";
	private String name = "";
	private String password = "";

	public CLunchyUser()
	{
		
	}
	
	public CLunchyUser(Integer id, String login, String name, boolean isAdmin)
	{
		this.id = id;
		this.login = login;
		this.name = name;
		this.isAdmin = isAdmin;
		
		CLunchyApplication.getInstance().debug(
			String.format(
				"[CLunchyUser] User login: ID = %1$d, LOGIN = %2$s, NAME = %3$s; ADMIN = %4$s",
				this.id,
				this.login,
				this.name,
				this.isAdmin ? "true" : "false"
			)
		);
	}
	
	public boolean getIsAdmin()
	{
		return isAdmin;
	}
	
	public void setIsAdmin(boolean isAdmin)
	{
		this.isAdmin = isAdmin;
	}
	
	public String getLogin()
	{
		return login;
	}
	
	public void setLogin(String login)
	{
		this.login = login;
	}
	
	public String getName()
	{
		return name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public Integer getId()
	{
		return id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public String getPassword()
	{
		return password;
	}

	public void setPassword(String password)
	{
		this.password = password;
	}

}
